$package('Bdth.Message');
Bdth.Message = function () {
	var _box = null;
	var startTime = new Date().Format("yyyy-MM-dd") + " 00:00:00";
	var endTime = new Date().Format("yyyy-MM-dd") + " 23:59:59";
	var _this = {
		config: {
			dataGrid: {
				title: '报文短信数据列表',
				url: path + '/message/dataList',
				queryParams: {"startTime": startTime, "endTime": endTime},
				columns: [[
					//{field: 'id', checkbox: true, title: 'id'},
					{field: 'sendEquipName', title: '发送方显示名称', width: 120, sortable: false},
					{field: 'sendDepname', title: '发送方分组', width: 120, sortable: false},
					{field: 'recEquipName', title: '接收方显示名称', width: 120, sortable: false},
					{field: 'recDepname', title: '接收方分组', width: 120, sortable: false},
					{field: 'sendTime', title: '发送时间', width: 120, sortable: false},
					{field: 'message', title: '内容', width: 200, sortable: false},
					{
						field: 'act',
						title: '查看',
						width: 60,
						sortable: false,
						formatter: function (value, rowData, rowIndex) {
							var html = "<a href=\"javascript:detailMessage('" + rowData.message + "');\">" + " 详细内容</a>";
							return html;
						}
					},
				]]
			},
		},
		init: function () {
			_box = new DataGrid(_this.config);
			_box.init();
		}
	}
	return _this;
}();

$(function () {
	Bdth.Message.init();
});		